package xin.mashibo.artcobutest.vo;

import android.os.Parcel;
import android.os.Parcelable;

import com.artc.development.myble.sdk.CardConsumeRecord;

/**
 * @author MaShibo
 *         on 2018/3/26
 */
public class CardConsumeExtend extends CardConsumeRecord implements Parcelable {

    public CardConsumeExtend() {
    }

    public CardConsumeExtend(CardConsumeRecord consumeRecord) {
        applicationId = consumeRecord.applicationId;
        recordLength = consumeRecord.recordLength;
        applicationLockFlag = consumeRecord.applicationLockFlag;
        tollRoadNetworkId = consumeRecord.tollRoadNetworkId;
        tollStationId = consumeRecord.tollStationId;
        tollLaneId = consumeRecord.tollLaneId;
        timeUnix = consumeRecord.timeUnix;
        vehicleModel = consumeRecord.vehicleModel;
        passStatus = consumeRecord.passStatus;
        reserve1 = consumeRecord.reserve1;
        staffNo = consumeRecord.staffNo;
        mtcSequenceNo = consumeRecord.mtcSequenceNo;
        vehicleNumber = consumeRecord.vehicleNumber;
        reserve2 = consumeRecord.reserve2;
    }

    protected CardConsumeExtend(Parcel in) {
        applicationId = in.readString();
        recordLength = in.readString();
        applicationLockFlag = in.readString();
        tollRoadNetworkId = in.readString();
        tollStationId = in.readString();
        tollLaneId = in.readString();
        timeUnix = in.readString();
        vehicleModel = in.readString();
        passStatus = in.readString();
        reserve1 = in.readString();
        staffNo = in.readString();
        mtcSequenceNo = in.readString();
        vehicleNumber = in.readString();
        reserve2 = in.readString();
    }

    public static final Creator<CardConsumeExtend> CREATOR = new Creator<CardConsumeExtend>() {
        @Override
        public CardConsumeExtend createFromParcel(Parcel in) {
            return new CardConsumeExtend(in);
        }

        @Override
        public CardConsumeExtend[] newArray(int size) {
            return new CardConsumeExtend[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(applicationId);
        dest.writeString(recordLength);
        dest.writeString(applicationLockFlag);
        dest.writeString(tollRoadNetworkId);
        dest.writeString(tollStationId);
        dest.writeString(tollLaneId);
        dest.writeString(timeUnix);
        dest.writeString(vehicleModel);
        dest.writeString(passStatus);
        dest.writeString(reserve1);
        dest.writeString(staffNo);
        dest.writeString(mtcSequenceNo);
        dest.writeString(vehicleNumber);
        dest.writeString(reserve2);
    }
}
